# choice = input("输入1表示好好学习，输入2表示躺平摆烂")
# if choice == '1':
#     print("你会找到一份好的工作")
# elif choice =='2':
#     print("你完蛋了")
# else :
#     print("输入有误")
# num = 1
# sum = 0
# while num<=5:
#     count = 1
#     i = 1
#     while i<=num:
#         count = count*i
#         i = i+1
#     sum = sum+count
#     num = num+1
# print(f"sum = {sum}")
#人生重开模拟器
# import random
# import time
# import sys
# print("---------------------------------------")
# print("                                       ")
# print("        花有重开日，人无再少年              ")
# print("                                       ")
# print("        欢迎来到人生重开模拟器              ")
# print("                                       ")
# print("---------------------------------------")
# #设置初始属性，颜值，智力，体质，家境，每项1-10，总和20
# while True:
#     print("请设置初始属性，总和为20")
#     face = int(input("请输入颜值(1-10):"))
#     iq = int(input("请输入智力(1-10):"))
#     strong = int(input("请输入体质(1-10):"))
#     home = int(input("请输入家境(1-10):"))
#     if face<1 or face>10:
#         print("颜值设置有误")
#         continue
#     if iq<1 or iq > 10:
#         print("智力设置有误")
#         continue
#     if strong <1 or strong >10:
#         print("体质设置有误")
#         continue
#     if home<1 or home>10:
#         print("家境设置有误")
#         continue
#     if (face + iq + strong + home)!=20:
#         print("设置有误，重新设置")
#         continue
#     print("初始属性输入完毕")
#     print(f"颜值:{face},智力：{iq},体质：{strong},家境：{home}")
#     point = random.randint(1,6)
#     if point%2==1:
#         print("你是个男孩")
#     else:
#         print("你是个女孩")
#     print(point)
#     time.sleep(10)
#     sys.exit(0)
#     break
# def calcSum(beg,end):
#     theSum = 0
#     for i in range(beg,end+1):
#         theSum = theSum + i
#     print(theSum)
# calcSum(1,10)
# calcSum(1,100)
# x = 10
# y = 20
# def func():
#     global x
#     x= 20
#     print(x)
# func()
# print(x)
def a():
    x = 10
    print(x,a)
def b():
    x = 20
    a()
    print(x,b)
def c():
    x = 30
    b()
    print (x,c)
def d():
    x = 40
    c()
    print(x,d)
x = 0
d()
